import axios from 'axios';

//创建axios实例
export const Service = axios.create({
  baseURL: 'http://localhost:8080',
  headers: {
    'Content-Type': "application/json;charset=UTF-8"
  },
  timeout: 5000
});

export const getAvailable = () => {
  return Service.get('/countMaintenance')
}

export const getCountRun = () => {
  return Service.get('/countRun')
}

export const getCountEmployee = () => {
  return Service.get('/countEmployee')
}

export const getCountVehicle = () => {
  return Service.get('/countVehicle')
}


//获取温度
export const getTemperature = () => {
  return Service.get('/getTemperature')
}

//获取岗位分布数据
export const getPosition = () => {
  return Service.get('/getPosition')
}

//获取员工状态数据
export const getStatusDistributionByEmployee = () => {
  return Service.get('/getStatusDistributionByEmployee')
}

//获取车辆状态数据
export const getStatusDistribution = () => {
  return Service.get('/getStatusDistribution')
}
//获取乘客数量数据
export const getPassengers = () => {
  return Service.get('/getPassengers')
}
//获取发车数量数据
export const getDepartures = () => {
  return Service.get('/getDepartures')
}